home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
nivb
/
dllvers.frm
< prev
next >
Wrap
Text File
|
1995-05-07
|
2KB
|
84 lines
VERSION 2.00
Begin Form DLLVersionForm
Caption = "DLLVersions"
ClientHeight = 1815
ClientLeft = 3135
ClientTop = 1590
ClientWidth = 2775
Height = 2220
Left = 3075
LinkMode = 1 'Source
LinkTopic = "Form2"
ScaleHeight = 1815
ScaleWidth = 2775
Top = 1245
Width = 2895
Begin CommandButton OKButton
Caption = "OK"
Height = 375
Left = 1080
TabIndex = 0
Top = 1320
Width = 735
End
Begin Label Label3
Alignment = 2 'Center
Height = 255
Left = 120
TabIndex = 3
Top = 960
Width = 2535
End
Begin Label Label2
Alignment = 2 'Center
Height = 255
Left = 120
TabIndex = 2
Top = 600
Width = 2535
End
Begin Label Label1
Alignment = 2 'Center
Height = 255
Left = 120
TabIndex = 1
Top = 240
Width = 2535
End
End
Sub Form_Load ()
Label1.Caption = GetDLLVersion("NWNETAPI.DLL")
Label2.Caption = GetDLLVersion("NWIPXSPX.DLL")
Label3.Caption = GetDLLVersion("NWPSERV.DLL")
End Sub
Function GetDLLVersion (DLLFileName$) As String
winDir$ = Environ$("windir")
DLLFile$ = winDir$ + "\" + DLLFileName$
fileFound$ = Dir$(DLLFile$)
If (Len(fileFound$) = 0) Then
GetDLLVersion = DLLFileName$ + " not found"
Else
Open DLLFile$ For Binary Access Read Shared As #1
Do While Not EOF(1)
buffer$ = Input$(8, #1)
If (buffer$ = "VeRsIoN=") Then
Do
char$ = Input$(1, #1)
version$ = version$ + char$
Loop While (char$ <> Chr$(0))
GoTo Break
End If
Loop
Break:
Close
End If
GetDLLVersion = version$
End Function
Sub OKButton_Click ()
Unload DLLVersionForm
End Sub